HBOTV[优].js 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. var rule = {
  2. title: 'HBOTV[优]',
  3. host: 'https://www.hbotv1.com/',
  4. url: '/fyclass/index_fypage.html[/fyclass/index.html]',
  5. searchUrl: '/vodsearch/**-fypage/',
  6. searchable: 2,
  7. quickSearch: 0,
  8. filterable: 0,
  9. headers: {
  10. 'User-Agent': 'PC_UA',
  11. },
  12. class_parse: '.stui-header__menu li;a&&Text;a&&href;.*/(.*?)/',
  13. play_parse: true,
  14. lazy: "js:\n let html = request(input);\n let hconf = html.match(/r player_.*?=(.*?)</)[1];\n let json = JSON5.parse(hconf);\n let url = json.url;\n if (json.encrypt == '1') {\n url = unescape(url);\n } else if (json.encrypt == '2') {\n url = unescape(base64Decode(url));\n }\n if (/\\.(m3u8|mp4|m4a|mp3)/.test(url)) {\n input = {\n parse: 0,\n jx: 0,\n url: url,\n };\n } else {\n input;\n }",
  15. limit: 6,
  16. double: true,
  17. 推荐: 'ul.stui-vodlist.clearfix;li;a&&title;.lazyload&&data-original;.pic-text&&Text;a&&href',
  18. 一级: 'ul.stui-vodlist.clearfix li;a&&title;.lazyload&&data-original;.pic-text&&Text;a&&href',
  19. 二级: {
  20. title: '.stui-content__detail .title&&Text;.stui-content__detail&&p:eq(3)&&a&&Text',
  21. img: '.stui-content__thumb .lazyload&&data-original',
  22. desc: '.pic-text&&Text;.stui-content__detail&&p:eq(3)&&a:eq(2)&&Text;.stui-content__detail&&p:eq(3)&&a:eq(1)&&Text;.stui-content__detail p--span&&Text;.stui-content__detail p:eq(1)--span&&Text',
  23. content: '.detail-sketch&&Text',
  24. tabs: '.stui-pannel__head h3',
  25. lists: '.stui-content__playlist:eq(#id) li',
  26. },
  27. 搜索: $js.toString(() => {
  28. var d = [];
  29. var body = 'keyboard=' + KEY + '&show=title&tempid=1&tbname=news&mid=1&dopost=search'; //log(body)
  30. var headers = `{
  31. 'Host': 'www.hbotv1.com',
  32. 'content-length': '79',
  33. 'cache-control': 'max-age=0',
  34. 'upgrade-insecure-requests': '1',
  35. 'origin': 'https://www.hbotv1.com',
  36. 'content-type': 'application/x-www-form-urlencoded',
  37. 'user-agent': 'Mozilla/5.0 (Linux; Android 12; 22021211RC Build/SKQ1.211006.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/99.0.4844.88 Mobile Safari/537.36',
  38. 'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
  39. 'x-requested-with': 'com.example.hikerview',
  40. 'sec-fetch-site': 'same-origin',
  41. 'sec-fetch-mode': 'navigate',
  42. 'sec-fetch-user': '?1',
  43. 'sec-fetch-dest': 'document',
  44. 'referer': 'https://www.hbotv1.com/vodsearch/203070-0/',
  45. 'accept-language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7'
  46. }`;
  47. var html = fetch('https://www.hbotv1.com/e/search/index.php', {
  48. headers: headers,
  49. body: body,
  50. method: 'POST'
  51. }); //log(html)
  52. var list = pdfa(html, '.stui-vodlist__media&&li');
  53. for (var j in list) {
  54. d.push({
  55. title: pdfh(list[j], '.lazyload&&title'),
  56. desc: pdfh(list[j], '.pic-text&&Text'),
  57. img: pd(list[j], '.lazyload&&data-original') + '@Referer=',
  58. url: 'https://www.hbotv1.com'+pdfh(list[j], '.lazyload&&href') + '#immersiveTheme#'
  59. });
  60. }
  61. setResult(d);
  62. }),
  63. }